package com.weibo.dip.hetest;

import java.util.concurrent.TimeUnit;

/** Created by haisen on 2018/8/3. */
public class HeTest {
  public static void main(String[] args) {
    new Thread(
            () -> {
              AlertUtil alertUtil = new AlertUtil();
              BasicUtil basicUtil = new BasicUtil();
              StreamingUtil streamingUtil = new StreamingUtil();
              while (!Thread.interrupted()) {
                System.out.println(alertUtil.getAlertInfos());
                try {
                  TimeUnit.MILLISECONDS.sleep(10000);
                } catch (InterruptedException e) {
                  e.printStackTrace();
                }
                System.out.println(basicUtil.getById(6));
                try {
                  TimeUnit.MILLISECONDS.sleep(10000);
                } catch (InterruptedException e) {
                  e.printStackTrace();
                }
                System.out.println(streamingUtil.listWait());
                try {
                  TimeUnit.MILLISECONDS.sleep(10000);
                } catch (InterruptedException e) {
                  e.printStackTrace();
                }
                System.out.println(streamingUtil.selectByAppName("test"));
                try {
                  TimeUnit.MILLISECONDS.sleep(10000);
                } catch (InterruptedException e) {
                  e.printStackTrace();
                }
              }
            })
        .start();
  }
}
